#include<stdio.h>

int main() {
	//char a = 'Y', b = 'B', c = 'O';
	int x, y, s;
	/*a = a + 32;
	b += 32;
	c += 32;
	printf("%c%c%c", b,c,a);*/

	
	scanf("%d,%d", &x, &y);
	s = (x + y) / 2;
	printf("%d", s);
	return 0;
}